<template>
  <div class="C">
      <span>我是C组件(接收方)</span>
      <br>
      {{ msg }}
  </div>
</template>

<script>
import Bus from "../utils/EventBus";
export default {
  name: 'CComp',
  data() {
    return {
      msg:''
    }
  },
  created(){
    Bus.$on("sendMsg",(newMsg)=>{
      this.msg=newMsg+"哼哼嗯啊啊啊啊啊啊啊啊啊啊"
    })
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .C{
    width: 300px;
    height: 300px;
    border: 2px solid black;
    padding: 10px;
  }
</style>
